import Login from '../day4/Login'
import Article from '../day4/Article'

import { createBrowserRouter, createHashRouter } from 'react-router-dom'
import Layout from '../day4/Layout'
import Borad from '../day4/Borad'
import About from '../day4/About'
import NotFound from '../day4/NotFound'

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        // path: 'borad',
        index: true,
        element: <Borad />
      },
      {
        path: 'about',
        element: <About />
      },
    ]
  },
  {
    path: '/login',
    // 这里写的是一个标签
    element: <Login />
  },
  {
    path: '/article/:id/:name',
    // 这里写的是一个标签
    element: <Article />
  },
  {
    path: '*',
    element: <NotFound />
  }

])


export default router




